'''
Author: your name
Date: 2020-10-22 10:02:47
LastEditTime: 2020-10-22 10:06:17
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: /mtl-text-recognition/config/get_image_mean.py
'''
import cv2
import numpy as np

image_path = '/data1/lhw/workspace/OCR_Test/火车票/IMG_20190225_151222.jpg'
img = cv2.imread(image_path)
img_gray = cv2.cvtColor(img,cv2.COLOR_RGB2GRAY)
np_img = np.array(img_gray)
print(np.mean(np_img))
print(img.shape)